/**
 * 
 */

const router = require('express').Router()
const { json } = require('express')
const db = require('../../../dbconfig')

router.post('/userinfo',(req,res) => {
    // console.log(req.query.userid)
    // console.log(res.auth);
    let searh = req.query.userid
    if(searh != ''){
        let sql = "select * from userinfo where" + " " + "user=" + searh
        // console.log(sql);
        db.query(sql,(err,data)=>{
            // console.log(JSON.stringify(data))
            res.send(JSON.stringify(data))
        })
    }else{
        res.send({status: false})
    }
})

module.exports = router